package com.tj.collection.db.admin.dao;

import com.tj.collection.db.admin.entity.AuthAdminRoleEntity;
import com.tj.collection.db.admin.entity.AuthAdminRoleEntityConditions;
import com.tj.collection.common.old.BaseDAO;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: sm
 * Date: 2017/3/11
 * Time: 上午9:59
 */
public interface AuthAdminRoleDAO extends BaseDAO<AuthAdminRoleEntity, Long, AuthAdminRoleEntityConditions> {
    /**
     * @param adminId
     * @return
     */
    List<AuthAdminRoleEntity> getListByAdminId(Long adminId);

    /**
     *
     * @param adminId
     * @return
     */
    Boolean deleteByAdminId(Long adminId);


    /**
     *
     * @param roleId 角色ID
     * @return
     */
    List<Long> getAdminIdListByRoleId(Long roleId);

    /**
     * 校验管理员的角色
     *
     * @param adminId 管理员
     * @param roleId  角色id
     * @return
     */
    Boolean checkAdminRole(Long adminId, List<Long> roleId);

    /**
     *
     * @param roleIdList
     * @return
     */
    List<Long> getAdminIdListByRoleIdList(List<Long> roleIdList);
}
